<?php
    $home_nav = '';
    $profile_nav = '';
    $project_nav = '';
    $product_nav = '';
    $contact_nav = ' class="current"';
    include('header.php');
?>
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=ABQIAAAAwJ6cy9vaeGZ3pMBMiOhkNRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTEewgkyWybGKysIseDE-bwSlxSzA" type="text/javascript"></script>
    <div id="contact_l">
        <form id="contact_frm" method="post" class="formular" >
            <table id="contact_tb">
                <tr>
                    <td class="td_left"><?php _l('contact-name'); ?> :</td>
                    <td colspan="2"><input type="text" name="name" class="validate[required]" id="req1" /></td>
                </tr>
                <tr>
                    <td class="td_left"><?php _l('contact-tel'); ?> :</td>
                    <td colspan="2"><input type="text" name="tel" class="validate[required,custom[phone]]" id="req2" /></td>
                </tr>
                <tr>
                    <td class="td_left"><?php _l('contact-email'); ?> :</td>
                    <td colspan="2"><input type="text" name="email" class="validate[required,custom[email]]" id="req3" /></td>
                </tr>
                <tr>
                    <td colspan="3" class="td_textarea">
                        <p><?php _l('contact-msg'); ?> :</p>
                        <textarea name="msg" class="validate[required]" id="req4"></textarea>
                    </td>
                </tr>
                <tr>
                    <td colspan="3" class="td_send_bt">
                        <div id="td_send_msg"><?php _l('contact-complete-form'); ?></div>
                        <div id="td_send_bt_"><img src="images/ajax-loader.gif" class="display_none" id="ajax_loader" /><img src="images/contact_frm_button_<?php echo $_SESSION['lang']; ?>.jpg" alt="<?php _l('contact-send-title'); ?>" id='contact_frm_bt' /></div>
                        <div class="clear">&nbsp;</div>
                    </td>
                </tr>
            </table>
        </form>
    </div>
    <div id="contact_r">
	<?php _l('contact-company-name'); ?>
        
        <p class="address">
            <?php _l('contact-address'); ?>
        </p>
        <p class="address">
            <?php _l('contact-tels'); ?> 
        </p>
        
        <p class="print_map">
            <a href="map.html" class="aColorBox" alt="<?php _l('contact-print-map-alt'); ?>"><img src="images/<?php _l('contact-print-map-bt'); ?>" alt="<?php _l('contact-print-map-title'); ?>" /></a>
        </p>
        
        <p class="contact_map">
            <iframe width="359" height="194" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.th/maps/ms?hl=<?php echo $_SESSION['lang']; ?>&amp;ie=UTF8&amp;msa=0&amp;msid=212422466666536299213.0004a12bc9bcd27f4849a&amp;ll=13.662292,100.404224&amp;spn=0.00809,0.015407&amp;z=15&amp;output=embed"></iframe><br />
            <a href="http://maps.google.co.th/maps?f=q&amp;source=embed&amp;hl=<?php echo $_SESSION['lang']; ?>&amp;geocode=&amp;q=%E0%B8%9B%E0%B8%90%E0%B8%A1+%E0%B9%80%E0%B8%9F%E0%B8%AD%E0%B8%A3%E0%B9%8C%E0%B8%99%E0%B8%B4%E0%B9%80%E0%B8%88%E0%B8%AD%E0%B8%A3%E0%B9%8C%2F1994+%E0%B8%9A%E0%B8%B2%E0%B8%87%E0%B8%9A%E0%B8%AD%E0%B8%99+%E0%B8%81%E0%B8%A3%E0%B8%B8%E0%B8%87%E0%B9%80%E0%B8%97%E0%B8%9E%E0%B8%A1%E0%B8%AB%E0%B8%B2%E0%B8%99%E0%B8%84%E0%B8%A3&amp;aq=&amp;sll=13.663398,100.402722&amp;sspn=0.004399,0.010568&amp;ie=UTF8&amp;hq=%E0%B8%9B%E0%B8%90%E0%B8%A1+%E0%B9%80%E0%B8%9F%E0%B8%AD%E0%B8%A3%E0%B9%8C%E0%B8%99%E0%B8%B4%E0%B9%80%E0%B8%88%E0%B8%AD%E0%B8%A3%E0%B9%8C%2F1994&amp;hnear=%E0%B8%9A%E0%B8%B2%E0%B8%87%E0%B8%9A%E0%B8%AD%E0%B8%99+%E0%B8%81%E0%B8%A3%E0%B8%B8%E0%B8%87%E0%B9%80%E0%B8%97%E0%B8%9E%E0%B8%A1%E0%B8%AB%E0%B8%B2%E0%B8%99%E0%B8%84%E0%B8%A3&amp;ll=13.662564,100.404096&amp;spn=0.004045,0.007682&amp;z=16&amp;iwloc=A" title="<?php _l('contact-print-map-alt'); ?>" target="_blank"><?php _l('contact-print-map-click'); ?></a>
        </p>
    </div>
    <div class="clear">&nbsp;</div>
    <div id="contact_bottom" class="content_box png_bg">
        &nbsp;
    </div>
    <script src="js/jquery.colorbox-min.js" type="text/javascript"></script>
    <link rel="stylesheet" href="css/colorbox.css" type="text/css" media="all" />
    
    <link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css"/>
    <script src="js/languages/jquery.validationEngine-<?php echo $_SESSION['lang']; ?>.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/js.func.js" type="text/javascript" charset="utf-8"></script>
    <script>
	$(document).ready(function(){
	    $('.aColorBox').colorbox();
            
            $("#contact_frm").validationEngine();
            
            $('#contact_frm_bt').click(function(){
                if( $("#contact_frm").validationEngine('validate') ){
                    $('#contact_frm_bt').css('display','none');
                    $('#ajax_loader').css('display','inline');
                    var frm_data = $('#contact_frm').serialize();
                    
                    $.post("function/sent-contact-mail.php", frm_data ,function(data){
                        if(trim(data)=='success'){
                            alert('ข้อความถูกส่งเรียบร้อยแล้ว กรุณารอการติดต่อกลับค่ะ');
                            $("#contact_frm")[0].reset();
                        }else{
                            alert('ไม่สามารถส่งข้อความได้ กรุณาลองใหม่อีกครั้งค่ะ');
                        }
                        $('#contact_frm_bt').css('display','inline');
                        $('#ajax_loader').css('display','none');
                    }/*, "json"*/);
                }
            });
	    
	    if($(window).height()<610){
		$("#main_bg").height(610);
		$("#main_bg").css('overflowY','hidden');
		$("#main_bg").css('display','block');
	    }else{
		$("#main_bg").height($(window).height());
		$("#main_bg").css('overflowY','hidden');
		$("#main_bg").css('display','block');
		$("#footer").css('position','absolute');
		$("#footer").css('bottom','0');
	    }
        });
    </script>
<?php
    include('footer.php');
?>